
import { _decorator, Component, Node } from 'cc';
import { EVENT_ENUM, CONTROLLER_ENUM } from '../../Enum';
import EventManager from '../../Runtime/EventManager';
const { ccclass, property } = _decorator;

/**
 * Predefined variables
 * Name = MenuManager
 * DateTime = Mon Aug 14 2023 12:55:14 GMT+0800 (中国标准时间)
 * Author = zshzshzsh15
 * FileBasename = MenuManager.ts
 * FileBasenameNoExtension = MenuManager
 * URL = db://assets/Script/UI/MenuManager.ts
 * ManualUrl = https://docs.cocos.com/creator/3.4/manual/zh/
 *
 */

@ccclass('MenuManager')
export class MenuManager extends Component {


    handleUndo() {
        EventManager.Instance.emit(EVENT_ENUM.REVOKE_STEP)


    }


    handleRestart() {
        EventManager.Instance.emit(EVENT_ENUM.RESTART_LEVEL)
    }

    handleOut() {
        EventManager.Instance.emit(EVENT_ENUM.QUIT_BATTLE)
    }


    // [1]
    // dummy = '';

    // [2]
    // @property
    // serializableDummy = 0;

    start() {
        // [3]
    }

    // update (deltaTime: number) {
    //     // [4]
    // }
}

/**
 * [1] Class member could be defined like this.
 * [2] Use `property` decorator if your want the member to be serializable.
 * [3] Your initialization goes here.
 * [4] Your update function goes here.
 *
 * Learn more about scripting: https://docs.cocos.com/creator/3.4/manual/zh/scripting/
 * Learn more about CCClass: https://docs.cocos.com/creator/3.4/manual/zh/scripting/decorator.html
 * Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.4/manual/zh/scripting/life-cycle-callbacks.html
 */
